import { buildGetUrl } from '@/core/http/requestUrl.js';

export default class PiplineProjectController {
    static ListProject(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/ListProject', 'post', params, axiosOption, httpOption);
    }

    //   static view(sender, params, axiosOption, httpOption) {
    //     return sender.doUrl('/admin/app/projectDbfiles/view', 'get', params, axiosOption, httpOption);
    //   }

    //   static export(sender, params, fileName) {
    //     return sender.download('/admin/app/projectDbfiles/export', params, fileName);
    //   }

    //   static import(sender, params) {
    //     return sender.upload('/admin/app/projectDbfiles/import', params);
    //   }

    //   static printUrl(params) {
    //     return buildGetUrl('/admin/app/projectDbfiles/print', params);
    //   }

    // 添加项目
    static AddProject(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/AddProject', 'post', params, axiosOption, httpOption);
    }

    // 删除项目
    static DeleteProject(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/DeleteProject', 'post', params, axiosOption, httpOption);
    }

    // 获取项目配置
    static ListProjectConfig(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/ListProjectConfig', 'post', params, axiosOption, httpOption);
    }

    // 获取项目图层GeoJson
    static ListLayerGeojson(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/ListLayerGeojson', 'get', params, axiosOption, httpOption);
    }

    // 获取项目图层数据
    static ListLayerData(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/ListLayerData', 'post', params, axiosOption, httpOption);
    }

    // 更新项目信息
    static UpdateProject(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/update', 'post', params, axiosOption, httpOption);
    }

    // 获取图层某个矢量图斑数据
    static viewLayerData(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/viewLayerData', 'post', params, axiosOption, httpOption);
    }

    static updateLayerData(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/updateLayerData', 'post', params, axiosOption, httpOption);
    }
    // 根据范围导出数据
    static ExportProjectData(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/ExportProjectData', 'post', params, axiosOption, httpOption);
    }

    // 导入数据
    static ImportProjectData(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/dc/ImportProjectData', 'post', params, axiosOption, httpOption);
    }

    // 查询过滤条件（地区树列表）接口
    static listAreaTree(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/project/listAreaTree', 'post', params, axiosOption, httpOption);
    }

    // 查询过滤条件（年份列表）接口
    static listYearList(sender, params, axiosOption, httpOption) {
        return sender.doUrl('/admin/app/project/listYearList', 'post', params, axiosOption, httpOption);
    }

    //   static update(sender, params, axiosOption, httpOption) {
    //     return sender.doUrl(
    //       '/admin/app/projectDbfiles/update',
    //       'post',
    //       params,
    //       axiosOption,
    //       httpOption
    //     );
    //   }
}
